<%--
  Created by IntelliJ IDEA.
  User: Tang'ya'kang
  Date: 2023/5/10
  Time: 21:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<html>
<head>
    <title>Login</title>
    <style>
        div{
            position: relative;
        }
    </style>
</head>
<%@ include file="head.jsp"%>
<script>
    $(function () {
        $("#codeImg").click(function () {
            this.src="${sessionScope.basePath}kaptchaServlet.jpg?"+new Date();
        });
    });
</script>

<body>
<div class="card">
    <div class="card-body">
        <h5 class="card-title" align="center" style="font-size: 20px">用户登录</h5>
        <h5 class="card-title" align="center" style="font-size: 8px">User Login</h5>
        <div class="card-body">
            <form action="./userServlet" method="post">
                <table>
                <input type="hidden" name="hidden" value="Login">
                <div class="form-group" style="display: flex;align-items: center;justify-content: center;left: -4px">
<%--<<<<<<< HEAD--%>
<%--                    <div style="display: inline-block"><label> 用 户 名 :</label></div>--%>
<%--                    <div style="display: inline-block"><input type="text" class="form-control" id="username" name="username" style="width: 400px;height: 50px"></div>--%>
<%--                </div>--%>
<%--                <div class="form-group" align="center">--%>
<%--                    <div style="display: inline-block"><label> 密 码 :</label></div>--%>
<%--                    <div style="display: inline-block"><input type="password" class="form-control" id="password" name="password" style="width: 400px;height: 50px"></div>--%>
<%--                </div>--%>
<%--                <div class="form-group" align="center">--%>
<%--                    <div style="display: inline-block"><label> 验 证 码 :</label></div>--%>
<%--                    <div style="display: inline-block"><input type="text" class="form-control" id="code" name="code" style="width: 400px;height: 50px"></div>--%>
<%--=======--%>
                    <label> 用 户 名 ：</label>
                    <input type="text" class="form-control" id="username" name="username" style="width: 400px;height: 50px">
                </div>
                <div class="form-group" style="display: flex;align-items: center;justify-content: center;left: 5px">
                    <label> 密 码 ：</label>
                    <input type="password" class="form-control" id="password" name="password" style="width: 400px;height: 50px">
                </div>
                <div class="form-group" style="display: flex;align-items: center;justify-content: center;left: 95px;top: -24px">
                    <label> 验 证 码 ：</label>
                    <input type="text" class="form-control" id="code" name="code" style="width: 400px;height: 50px">
<%-->>>>>>> origin/master--%>
                    <img src="./kaptchaServlet.jpg" width="200px" height="100px" id="codeImg">
                </div>
                <div align="center" style="top: -40px"><button type="submit" class="btn btn-primary" style="width: 100px">登录</button></div>
                <label align-self="center"> <font color="red">${requestScope.status}</font></label>
                </table>
            </form>
            <div class="alert alert-success" role="alert">
                如果您之前的账号绑定了QQ邮箱，那么可以通过 <a href="./html/RetrievePassword.jsp" class="alert-link">邮箱重置密码</a>..
            </div>
        </div>
    </div>
    <%@ include file="Foot.jsp"%>
</div>
</body>
</html>
